// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : PhotonServerProject | PhotonServerCommon | AccountRegisterMessage.cs
// //  Created : 2016 - 04 - 15 15:25
// //  Modified: 2016 - 04 - 18 09:38
// //  ********************************************************************************

#pragma warning disable 1591, 0612, 3021

#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;

namespace PhotonServerCommon.Messages
{
    /// <summary>Holder for reflection information generated from AccountRegisterMessage.proto</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class AccountRegisterMessageReflection
    {
        #region Descriptor

        /// <summary>File descriptor for AccountRegisterMessage.proto</summary>
        public static pbr::FileDescriptor Descriptor
        {
            get { return descriptor; }
        }

        private static pbr::FileDescriptor descriptor;

        static AccountRegisterMessageReflection()
        {
            byte[] descriptorData = global::System.Convert.FromBase64String(
                string.Concat(
                    "ChxBY2NvdW50UmVnaXN0ZXJNZXNzYWdlLnByb3RvEhtQaG90b25TZXJ2ZXJD",
                    "b21tb24uTWVzc2FnZXMiZwoWQWNjb3VudFJlZ2lzdGVyTWVzc2FnZRIRCglM",
                    "b2dpbk5hbWUYASABKAkSFQoNTG9naW5QYXNzd29yZBgCIAEoCRIRCglHaXZl",
                    "bk5hbWUYAyABKAkSEAoIU3VyZU5hbWUYBCABKAliBnByb3RvMw=="));
            descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
                new pbr::FileDescriptor[] {},
                new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[]
                                                 {
                                                     new pbr::GeneratedCodeInfo(
                                                         typeof (
                                                         global::PhotonServerCommon.Messages.AccountRegisterMessage),
                                                         global::PhotonServerCommon.Messages.AccountRegisterMessage
                                                         .Parser,
                                                         new[] {"LoginName", "LoginPassword", "GivenName", "SureName"},
                                                         null, null, null)
                                                 }));
        }

        #endregion
    }

    #region Messages

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public sealed partial class AccountRegisterMessage : pb::IMessage<AccountRegisterMessage>
    {
        /// <summary>Field number for the "LoginName" field.</summary>
        public const int LoginNameFieldNumber = 1;

        /// <summary>Field number for the "LoginPassword" field.</summary>
        public const int LoginPasswordFieldNumber = 2;

        /// <summary>Field number for the "GivenName" field.</summary>
        public const int GivenNameFieldNumber = 3;

        /// <summary>Field number for the "SureName" field.</summary>
        public const int SureNameFieldNumber = 4;

        private static readonly pb::MessageParser<AccountRegisterMessage> _parser =
            new pb::MessageParser<AccountRegisterMessage>(() => new AccountRegisterMessage());

        public static pb::MessageParser<AccountRegisterMessage> Parser
        {
            get { return _parser; }
        }

        public static pbr::MessageDescriptor Descriptor
        {
            get
            {
                return global::PhotonServerCommon.Messages.AccountRegisterMessageReflection.Descriptor.MessageTypes[0];
            }
        }

        pbr::MessageDescriptor pb::IMessage.Descriptor
        {
            get { return Descriptor; }
        }

        public string LoginName
        {
            get { return loginName_; }
            set { loginName_ = pb::Preconditions.CheckNotNull(value, "value"); }
        }

        public string LoginPassword
        {
            get { return loginPassword_; }
            set { loginPassword_ = pb::Preconditions.CheckNotNull(value, "value"); }
        }

        public string GivenName
        {
            get { return givenName_; }
            set { givenName_ = pb::Preconditions.CheckNotNull(value, "value"); }
        }

        public string SureName
        {
            get { return sureName_; }
            set { sureName_ = pb::Preconditions.CheckNotNull(value, "value"); }
        }

        private string loginName_ = "";
        private string loginPassword_ = "";
        private string givenName_ = "";
        private string sureName_ = "";

        public AccountRegisterMessage()
        {
            OnConstruction();
        }

        public AccountRegisterMessage(AccountRegisterMessage other) : this()
        {
            loginName_ = other.loginName_;
            loginPassword_ = other.loginPassword_;
            givenName_ = other.givenName_;
            sureName_ = other.sureName_;
        }

        partial void OnConstruction();

        public AccountRegisterMessage Clone()
        {
            return new AccountRegisterMessage(this);
        }

        public override bool Equals(object other)
        {
            return Equals(other as AccountRegisterMessage);
        }

        public bool Equals(AccountRegisterMessage other)
        {
            if (ReferenceEquals(other, null))
            {
                return false;
            }
            if (ReferenceEquals(other, this))
            {
                return true;
            }
            if (LoginName != other.LoginName) return false;
            if (LoginPassword != other.LoginPassword) return false;
            if (GivenName != other.GivenName) return false;
            if (SureName != other.SureName) return false;
            return true;
        }

        public override int GetHashCode()
        {
            int hash = 1;
            if (LoginName.Length != 0) hash ^= LoginName.GetHashCode();
            if (LoginPassword.Length != 0) hash ^= LoginPassword.GetHashCode();
            if (GivenName.Length != 0) hash ^= GivenName.GetHashCode();
            if (SureName.Length != 0) hash ^= SureName.GetHashCode();
            return hash;
        }

        public override string ToString()
        {
            return pb::JsonFormatter.ToDiagnosticString(this);
        }

        public void WriteTo(pb::CodedOutputStream output)
        {
            if (LoginName.Length != 0)
            {
                output.WriteRawTag(10);
                output.WriteString(LoginName);
            }
            if (LoginPassword.Length != 0)
            {
                output.WriteRawTag(18);
                output.WriteString(LoginPassword);
            }
            if (GivenName.Length != 0)
            {
                output.WriteRawTag(26);
                output.WriteString(GivenName);
            }
            if (SureName.Length != 0)
            {
                output.WriteRawTag(34);
                output.WriteString(SureName);
            }
        }

        public int CalculateSize()
        {
            int size = 0;
            if (LoginName.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(LoginName);
            }
            if (LoginPassword.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(LoginPassword);
            }
            if (GivenName.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(GivenName);
            }
            if (SureName.Length != 0)
            {
                size += 1 + pb::CodedOutputStream.ComputeStringSize(SureName);
            }
            return size;
        }

        public void MergeFrom(AccountRegisterMessage other)
        {
            if (other == null)
            {
                return;
            }
            if (other.LoginName.Length != 0)
            {
                LoginName = other.LoginName;
            }
            if (other.LoginPassword.Length != 0)
            {
                LoginPassword = other.LoginPassword;
            }
            if (other.GivenName.Length != 0)
            {
                GivenName = other.GivenName;
            }
            if (other.SureName.Length != 0)
            {
                SureName = other.SureName;
            }
        }

        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                    default:
                        input.SkipLastField();
                        break;
                    case 10:
                    {
                        LoginName = input.ReadString();
                        break;
                    }
                    case 18:
                    {
                        LoginPassword = input.ReadString();
                        break;
                    }
                    case 26:
                    {
                        GivenName = input.ReadString();
                        break;
                    }
                    case 34:
                    {
                        SureName = input.ReadString();
                        break;
                    }
                }
            }
        }
    }

    #endregion
}

#endregion Designer generated code
